import { createApp } from 'vue'
// 引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import App from './App.vue'

// @ts-ignore 忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import { zhCn } from 'element-plus/es/locales.mjs'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
console.log(import.meta.env.VITE_APP_BASE_API)
app.use(ElementPlus,{
  locale: zhCn,
})

// import 'virtual:svg-icons-register'
import router from './router'
import axios from 'axios'
import pinia from './store'
// 设置权限拦截
import "./permission.ts"
axios({
  url:'/mock/login',
  method:'post',
  data:{
    username:'test1',
    password:'1234'
  }
})
app.use(router)
app.use(pinia)
app.mount('#app')
